"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const turf_1 = __importDefault(require("../../../ext/turf"));
function twoPolygonRelation(tilePolygon, customPolygon) {
    let relation = null;
    if (relation === null && turf_1.default.booleanContains(tilePolygon, customPolygon)) {
        relation = 'within';
    }
    if (relation === null && turf_1.default.booleanContains(customPolygon, tilePolygon)) {
        relation = 'partIn';
    }
    if (relation === null && turf_1.default.booleanDisjoint(tilePolygon, customPolygon)) {
        relation = 'disjoint';
    }
    if (relation === null && turf_1.default.booleanOverlap(tilePolygon, customPolygon)) {
        relation = 'crosses';
    }
    return relation;
}
exports.default = twoPolygonRelation;
